package com.tvein.web.controller
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
	//custom
	import com.tvein.web.common.CommonConstants;
	import com.tvein.Web;
	import com.tvein.web.model.ServerProxy;
	import com.tvein.web.model.FilesProxy;
	import com.tvein.web.view.ApplicationMediator;
	import com.tvein.web.view.SystemMediator;
	import com.tvein.web.view.WebMediator;
//
	public class StartupCommand extends SimpleCommand implements ICommand
	{
		override public function execute(notification:INotification) : void
		{
			var web:Web = notification.getBody() as Web;
			
			facade.registerProxy(new ServerProxy());
			facade.registerProxy(new FilesProxy());
			
			facade.registerMediator(new SystemMediator());
			facade.registerMediator(new ApplicationMediator(web));
			facade.registerMediator(new WebMediator(web));
		}
	}
}